<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">帖子列表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminChats/searchchats')}">
        分类:
        <select class="form-control" name="status" style="width: 140px;">
            <option value='all'>全部</option>
            <option value='1'>被禁</option>
            <option value='0'>没有被禁</option>
        </select> &nbsp;&nbsp;
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 300px;"
               value="{$keyword|default=''}" placeholder="用户昵称|openid|标题...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('AdminChats/index')}">清空</a>
    </form>
    <form method="post" action="" class="js-ajax-form">
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <notempty name="category">
                    <th width="50">{:lang('SORT')}</th>
                </notempty>
                <th width="50">ID</th>
                <th>用户昵称</th>
                <th>用户的openid</th>

                <th>标题</th>
                <th>内容</th>
                <th>图片</th>
                <th>点赞数</th>
                <th>发帖时间</th>
                <th width="150">状态</th>
                <th width="90">操作</th>
            </tr>
            </thead>
            <foreach name="chats" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td><b>{$vo.id}</b></td>
                    <td>
                        {$vo.username}
                    </td>
                    <td>
                        {$vo.openid}
                    </td>

                    <td>
                        {$vo.titile}
                    </td>
                    <td>
                        {$vo.content}
                    </td>
                    <td>
                      
                        <foreach name="$vo.img" item="value">
                            <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($value)}');">
                                <!--<i class="fa fa-photo fa-fw"></i>-->
                                <img src="{:cmf_get_image_preview_url($value)}" style="width:100px;height:100px">
                            </a>
                        </foreach>
                    </td>
                    <td>
                        {$vo.dianzhan}
                    </td>
                    <td>
                        {:date('Y-m-d H:i:s',$vo.dottime)}
                    </td>
                    <td>
                        <if condition="$vo.status==0">
                            正常
                            <else/>
                            该帖被禁
                        </if>
                    </td>
                    <td>
                        <a href="{:url('AdminChats/setstaus',array('id'=>$vo['id']))}" >
                            <if condition="$vo.status==0">
                                禁用
                            <else/>
                                解禁
                            </if>
                        </a>
                    </td>
                </tr>
            </foreach>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>